tmpStr = input('请输入字符串：')
wordNum=0
numbers=0
spaceNum=0
otherNum=0
for i in tmpStr:
    if i.isalpha():
        wordNum +=1
    elif i.isnumeric():
        numbers +=1
    elif i.isspace():
        spaceNum +=1
    else:
        otherNum +=1
print('字母%d个'%wordNum)
print('数字%d个'%numbers)
print('空格%d个'%spaceNum)
print('其他%d个'%otherNum)
